{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "No urey bradley terms detected, will use angle_style harmonic\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "d:\\softwares\\conda\\envs\\mosdef\\Lib\\site-packages\\mbuild\\formats\\lammpsdata.py:212: UserWarning: Explicit box bounds (i.e., mins and maxs) were not provided. Box bounds are assumed to be min = 0 and max = length in each direction. This may not produce a system with the expected spatial location and may cause non-periodic systems to fail. Bounds can be defined explicitly by passing the them to the write_lammpsdata function or by passing box info to the save function.\n",
      "  warn(\n"
     ]
    }
   ],
   "source": [
    "import mbuild as mb\n",
    "\n",
    "# define all necessary lattice parameters\n",
    "spacings = [0.40478, 0.40478, 0.40478]  # a, b, c\n",
    "angles = [90, 90, 90]  # alpha, beta, gamma\n",
    "points = [[0, 0, 0], [0.5, 0.5, 0], [0.5, 0, 0.5], [0, 0.5, 0.5]]\n",
    "\n",
    "# define lattice object\n",
    "fcc_lattice = mb.Lattice(\n",
    "    lattice_spacing=spacings, angles=angles, lattice_points={\"A\": points}\n",
    ")\n",
    "\n",
    "# define Compound\n",
    "cu = mb.Compound(name=\"Cu\")\n",
    "\n",
    "# populate lattice with compounds\n",
    "cu_lattice = fcc_lattice.populate(compound_dict={\"A\": cu}, x=7, y=7, z=7)\n",
    "\n",
    "cu_lattice.save(\"cu.base.lmp\", overwrite=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "d:\\softwares\\conda\\envs\\mosdef\\Lib\\site-packages\\mbuild\\conversion.py:2054: UserWarning: No element attribute associated with '<Mu pos=([0.1574 0.1574 0.1574]), 0 bonds, id: 2215433096784>'; and no matching elements found based upon the compound name. Setting atomic number to zero.\n",
      "  warn(warn_msg)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "No urey bradley terms detected, will use angle_style harmonic\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "d:\\softwares\\conda\\envs\\mosdef\\Lib\\site-packages\\mbuild\\formats\\lammpsdata.py:212: UserWarning: Explicit box bounds (i.e., mins and maxs) were not provided. Box bounds are assumed to be min = 0 and max = length in each direction. This may not produce a system with the expected spatial location and may cause non-periodic systems to fail. Bounds can be defined explicitly by passing the them to the write_lammpsdata function or by passing box info to the save function.\n",
      "  warn(\n"
     ]
    }
   ],
   "source": [
    "spacings2 = [0.31471, 0.31471, 0.31471]\n",
    "points2 = [[0.5, 0.5, 0.5], [0, 0, 0]]\n",
    "bcc_lattice = mb.Lattice(\n",
    "    lattice_spacing=spacings2, angles=angles, lattice_points={\"A\": points2}\n",
    ")\n",
    "\n",
    "mo = mb.Compound(name=\"Mu\")\n",
    "mo_lattice = bcc_lattice.populate(compound_dict={\"A\": mo}, x=9, y=9, z=9)\n",
    "mo_lattice.save(\"mo.base.lmp\", overwrite=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "d:\\softwares\\conda\\envs\\mosdef\\Lib\\site-packages\\mbuild\\compound.py:999: UserWarning: The Compound you are adding has a box. The box of the parent compound will be used. Use inherit_box = True if you wish to replace the parent compound box with that of Compound being added.\n",
      "  warn(\n",
      "d:\\softwares\\conda\\envs\\mosdef\\Lib\\site-packages\\mbuild\\compound.py:1012: UserWarning: After adding new Compound, Compound.box.lengths < Compound.boundingbox.lengths. There may be particles outside of the defined simulation box\n",
      "  warn(\n",
      "d:\\softwares\\conda\\envs\\mosdef\\Lib\\site-packages\\mbuild\\conversion.py:2054: UserWarning: No element attribute associated with '<Mu pos=([0.1574 0.1574 0.1574]), 0 bonds, id: 2215433096784>'; and no matching elements found based upon the compound name. Setting atomic number to zero.\n",
      "  warn(warn_msg)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "No urey bradley terms detected, will use angle_style harmonic\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "d:\\softwares\\conda\\envs\\mosdef\\Lib\\site-packages\\mbuild\\formats\\lammpsdata.py:212: UserWarning: Explicit box bounds (i.e., mins and maxs) were not provided. Box bounds are assumed to be min = 0 and max = length in each direction. This may not produce a system with the expected spatial location and may cause non-periodic systems to fail. Bounds can be defined explicitly by passing the them to the write_lammpsdata function or by passing box info to the save function.\n",
      "  warn(\n"
     ]
    }
   ],
   "source": [
    "final_model = mb.Compound()\n",
    "temp_cu = mb.clone(cu_lattice)\n",
    "##si_lattice.translate([0, 0, -2.5])\n",
    "temp_cu.translate([0, 0, 2.83239])\n",
    "final_model.add(temp_cu)\n",
    "final_model.add(mo_lattice)\n",
    "final_model.save(\"mo_cu.lmp\", overwrite=True)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "mosdef",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
